package com.medusa.aps.business.modules.modeling.model.output;

import com.medusa.aps.business.model.enums.ProductionType;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * @author miskw
 * @date 2023/8/21
 * @describe 描述
 */
@Data
@Accessors(chain = true)
@Schema(description = "BOM 子项物料")
public class BomItemVo implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;
    /**
     * 子项 id
     */
    @Schema(description = "子项 Id")
    private Long id;
    /**
     * 层级
     */
    @Schema(description = "层级")
    private Integer level;
    /**
     * 物料id
     */
    @Schema(description = "物料id")
    private Long materialId;
    /**
     * 物料编码
     */
    @Schema(description = "物料编码")
    private String materialCode;
    /**
     * 物料名称
     */
    @Schema(description = "物料名称")
    private String materialName;
    /**
     * 单位
     */
    @Schema(description = "单位")
    private String unit;
    /**
     * 单件用量
     */
    @Schema(description = "单件用量")
    private BigDecimal unitUsage;
    /**
     * 物料规格
     */
    @Schema(description = "物料规格")
    private String materialSpecification;
    /**
     * 生产类型
     */
    @Schema(description = "生产类型")
    private ProductionType productionType;
    /**
     * '上层子项Bom'
     */
    @Schema(description = "上层子项id")
    private Long parentId;
    /**
     * 上层子项物料编码
     */
    @Schema(description = "上层子项物料编码")
    private String parentMaterialCode;
    /**
     * 上层子项物料名称
     */
    @Schema(description = "上层子项物料名称")
    private String parentMaterialName;
    /**
     * 备注
     */
    @Schema(description = "备注")
    private String remarks;
    /**
     * 下层子项
     */
    @Schema(description = "下层子项")
    private List<BomItemVo> children;

}
